/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.fd.service;

import com.xy.biz.fd.domain.bo.DocumentBO;
import com.xy.biz.fd.domain.req.documentCode.GetDocumentByCodeRequest;
import com.xy.biz.fd.domain.req.documentCode.GetDocumentCodeRuleRequest;
import com.xy.biz.fd.domain.resp.GetDocumentCodeRuleResponse;
import com.xy.biz.fd.domain.resp.GetDocumentCodeRuleResponse1;
import com.xy.biz.fd.domain.resp.GetDocumentResponse;
import com.xy.biz.uc.domain.resp.ListUserGroupItemResponse;
import com.xy.lang.domain.Result;

import java.util.List;

/**
 *
 *
 * @author zsp
 * @date 2021-4-29
 */
public interface DocumentCodeRuleService {

    /**
     * 获取编码若无此规则名，则新建
     *
     * @param request
     * @return
     */
    String getCode(GetDocumentCodeRuleRequest request);

    /**
     * 生成下一个编码
     *
     * @param request
     * @return
     */
    String generateCode(GetDocumentCodeRuleRequest request);

    /**
     * 获取文档编号信息
     *
     * @param request
     * @return
     */
    Result<GetDocumentCodeRuleResponse1>  getCodeInfo(GetDocumentCodeRuleRequest request);


    /**
     * 通过文件编号获取
     *
     * @param request
     * @return
     */
    Result<GetDocumentResponse> getDocumentByCode(GetDocumentByCodeRequest request);
    Result<Boolean> getDocumentCodeIsExisted(GetDocumentByCodeRequest request);
}
